package cn.example.vip.mall.page.feign;

import cn.example.vip.mall.util.RespResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "mall-web-page", path = "/page", contextId = "mall-web-page-seckillitem-html")
public interface SeckillPageFeign {
	/**
	 * 根据 id 生成秒杀商品页面
	 * @param id
	 * @return
	 */
	@GetMapping("/seckill/goods/{id}")
	RespResult html(@PathVariable("id") String id) throws Exception;
	
	/**
	 * 根据 id 删除秒杀商品页面
	 * @param id
	 * @return
	 */
	@DeleteMapping("/seckill/goods/{id}")
	RespResult delHtml(@PathVariable("id") String id);
	
	/**
	 * 根据 activityId 删除秒杀商品页面
	 * @param activityId
	 * @return
	 */
	@DeleteMapping("/seckill/act/{activityId}")
	RespResult delByActivityId(@PathVariable("activityId") String activityId);
}
